<?php
/*
 * @Author: your name
 * @Date: 2020-10-16 16:19:55
 * @LastEditTime: 2020-12-17 10:44:30
 * @LastEditors: Please set LastEditors
 * @Description: 防火墙通信规则验证器
 * @FilePath: /special/application/adminapiv3/validate/FirewallSafeRuleValidate.php
 */
namespace app\adminapiv3\validate;

use think\Validate;

class FirewallSafeRuleValidate extends Validate
{
    protected $rule = [
        //主机id
        'host_id|主机ID' => 'require|number|length:1,10',
        //规则id
        'rule_id|规则ID' => 'require|regex:^\d+(,\d+){0,30}$',
    ];

    protected $scene = [
        //开启关闭
        'offOn' => ['host_id','rule_id'],
        //列表
        'list' => ['host_id'],
    ];
}